#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>


void *tfn(void *arg){
    int i = (int)arg;
    int *ret = malloc(sizeof(int));
    *ret = 100+i;
    return ret;
}

int main(){
    int a = 1;
    pthread_t tid;
    pthread_create(&tid,NULL,tfn,(void*)a);
    int *ret ;
    pthread_join(tid,&ret);
    printf("%d \n",*ret);
}